package MD5Util

import (
	"crypto/md5"
	"encoding/hex"
	"strings"
)

func Encode(str string)(string){
	md5Ctx := md5.New()
	md5Ctx.Write([]byte(str))
	cipherStr := md5Ctx.Sum(nil)
	//fmt.Print(cipherStr)
	//fmt.Print("\n")
	//fmt.Print(hex.EncodeToString(cipherStr))
	var result = hex.EncodeToString(cipherStr)
	return strings.ToUpper(result)
}